public class OutputEveryBit {
    public static void main(String[] args) {
        int a = 123;
        while (a != 0){
            System.out.print(a%10 + " ");
            a=a/10;
        }
    }
}
